home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 049a / sxpr228.zip / RXP.BAT < prev    next >
DOS Batch File  |  1990-06-29  |  2KB  |  68 lines

  1. @echo off
  2. :--------------------------------------------------------------------------
  3. : RXP.BAT
  4. :--------------------------------------------------------------------------
  5. : Batch file for Outside File Decompression/Compression with Silver Xpress.
  6. :                  (c) copyright 1988-90 by Santronics Software
  7. :--------------------------------------------------------------------------
  8. :  NOTE: This batch file is customized for PKZIP and PKUNZIP
  9. :        It assumes the default work directory is used.
  10. :--------------------------------------------------------------------------
  11. if not '%1' == '' goto  start
  12. :
  13.    echo ------------------------------------------------
  14.    echo usage:  RXP xpress_packet_name
  15.    echo         No extension is required
  16.    echo ------------------------------------------------
  17.    echo ---- Available Xpress files -----
  18.      if exist *.op? lf *.op?
  19.      echo > nul
  20.    echo ---- Available Reply Packets ----
  21.      if exist *.rep lf *.rep
  22.      echo > nul
  23.    goto end
  24. :
  25. :start
  26. :
  27. : make work directory and start decompression of packet.
  28. :
  29.   if  exist %1.opx goto ok1
  30.   echo %1 packet does not exist
  31.   goto end
  32. :ok1
  33.   md $work$.dir
  34.   echo  Opening up mail packet....
  35.   cd $work$.dir
  36.   PKUNZIP -o ..\%1.opx > nul
  37.   cd ..
  38.   if not exist %1.rep goto ok4
  39.   Echo  A reply Packet exist !
  40.   AskYN Delete this REPLY packet "%1.REP"? Y/N  20 10
  41.   if errorlevel 20 goto ok2
  42.   if errorlevel 10 goto ok3
  43.   goto ok4
  44. :ok2
  45.   erase %1.rep
  46.   echo  Reply %1.rep packet deleted.
  47.   goto ok4
  48. :ok3
  49.   Echo  Unpacking Current Reply Packet....
  50.   cd $work$.dir
  51.   PKUNZIP -o ..\%1.rep > nul
  52.   cd ..
  53. :ok4
  54. : YOU MUST BE IN THE STARTUP DIRECTORY. XPRESS WILL CHANGE TO $WORK$
  55.   xpread -O%1.opx
  56. : XPRESS WILL RETURN TO THE STARUP DIRECTORY
  57.   if not exist $work$.dir\!*.* goto cleanup
  58.   echo  Creating a reply packet.....
  59.   if exist %1.rep erase %1.rep
  60.   PKZIP -meb4 %1.rep $work$.dir\!*.* $work$.dir\*.ID > nul
  61. :cleanup
  62.   echo  Cleaning up work directory!
  63.   echo Y | erase $work$.dir\*.* > nul
  64.   rmdir $work$.dir
  65. :
  66. :end
  67.  
  68.